'use strict';

module.exports = app => {
  const { STRING, DATE, BIGINT } = app.Sequelize;

  const ProductLink = app.model.define('productLink', {
    id: { type: BIGINT, primaryKey: true, autoIncrement: true },
    image: {
      type: STRING(255),
      allowNull: false,
    },
    description: {
      type: STRING(255),
      allowNull: false,
    },
    purchase_url: {
      type: STRING(255),
      allowNull: false,
    },
    created_at: DATE,
    updated_at: DATE,
  }, {
    tableName: 't_productLink',
  });

  return ProductLink;
};
